package com.indexingsystem.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.indexingsystem.boss.Vo.OftenConsigneesVo;
import com.indexingsystem.boss.admin.mapper.OftenConsigneesMapper;
import com.indexingsystem.boss.entity.OftenConsignees;
import com.indexingsystem.system.service.IOftenConsigneesService;

@Service
public class OftenConsigneesServiceImpl implements IOftenConsigneesService {
	@Resource
	private OftenConsigneesMapper ocMapper;

	@Override
	public int deleteByPrimaryKey(String consigneeMessageId) {
		return ocMapper.deleteByPrimaryKey(consigneeMessageId);
	}

	@Override
	public int deleteBatchByIds(List<String> ids) {
		int count = 0;
		for(String id : ids){
			count += ocMapper.deleteByPrimaryKey(id);
		}
		return count;
	}

	@Override
	public int insert(OftenConsignees record) {
		return ocMapper.insert(record);
	}

	@Override
	public int insertSelective(OftenConsignees record) {
		return ocMapper.insertSelective(record);
	}

	@Override
	public Integer getOftenConsigneesListCount(OftenConsigneesVo record) {
		return ocMapper.getOftenConsigneesListCount(record);
	}

	@Override
	public List<OftenConsigneesVo> selectOftenConsigneesList(OftenConsigneesVo record) {
		return ocMapper.selectOftenConsigneesList(record);
	}

	@Override
	public OftenConsignees selectByPrimaryKey(String consigneeMessageId) {
		return ocMapper.selectByPrimaryKey(consigneeMessageId);
	}

	@Override
	public int updateByPrimaryKeySelective(OftenConsignees record) {
		return ocMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(OftenConsignees record) {
		return ocMapper.updateByPrimaryKey(record);
	}
	
	@Override
	public OftenConsignees getOftenConsigneesByOrderId(String orderId){
		return ocMapper.getOftenConsigneesByOrderId(orderId);
	}
}